package com.shujia.wyh.service.impl;

import com.shujia.wyh.dao.EmpDao;
import com.shujia.wyh.entity.Emp;
import com.shujia.wyh.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmpServiceImpl implements EmpService {

    @Autowired
    private EmpDao empDao;


    @Override
    public List<Emp> findAll() {
        return empDao.findAll();
    }

    @Override
    public int add(Emp emp) {
        return empDao.add(emp);
    }

    @Override
    public int delete(String empno) {
        return empDao.delete(empno);
    }

    @Override
    public Emp findByEmpno(String empno) {
        return empDao.findByEmpno(empno);
    }

    @Override
    public int updateEmp(Emp emp) {
        return empDao.updateEmp(emp);
    }


}
